package com.xuetang9.domain;

import java.io.Serializable;
import javax.persistence.*;

@Table(name = "user_roles")
public class UserRoles implements Serializable {
    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Integer userId;

    /**
     * 角色id
     */
    @Column(name = "roles_id")
    private Integer rolesId;

    private static final long serialVersionUID = 1L;

    /**
     * 获取用户id
     *
     * @return user_id - 用户id
     */
    public Integer getUserId() {
        return userId;
    }

    /**
     * 设置用户id
     *
     * @param userId 用户id
     */
    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    /**
     * 获取角色id
     *
     * @return roles_id - 角色id
     */
    public Integer getRolesId() {
        return rolesId;
    }

    /**
     * 设置角色id
     *
     * @param rolesId 角色id
     */
    public void setRolesId(Integer rolesId) {
        this.rolesId = rolesId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", rolesId=").append(rolesId);
        sb.append("]");
        return sb.toString();
    }
}